﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Home.Master" Inherits="System.Web.Mvc.ViewPage<SDT.Site.ViewModels.ArticleDetailViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%=Model.Article != null ?Html.Encode(Model.Article.Title) : "Bài viết không tồn tại hoặc đã bị xóa bởi người khác"%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%if (Model.Article != null)
  { %>
<div class="clear"></div>
<div class="breadcrumbs">
    <a href="/home">Trang chủ</a>
    <%if (Model.Article.ArticleCategory != null)
      { %>
        <%if (Model.Article.ArticleCategory.ParentArticleCategory != null)
          { %>
            <span></span><a href="/article/index/<%=Model.Article.ArticleCategory.ParentID %>"><%=Model.Article.ArticleCategory.ParentArticleCategory != null ? Html.Encode(Model.Article.ArticleCategory.ParentArticleCategory.Name) : string.Empty%></a>
        <%} %>
        <span></span><a href="/article/list/<%=Model.Article.ArticleCategory.ID %>"><%=Model.Article.ArticleCategory != null ? Html.Encode(Model.Article.ArticleCategory.Name) : string.Empty%></a>
        <span></span><%=Model.Article.Title.Length>60? Html.Encode(Model.Article.Title.Substring(0,60))+"...": Html.Encode(Model.Article.Title) %> 
    <%} %>
</div>
<div class="line"></div>
<%} %>
<div id="detail-art">
    <h2><%=Html.Encode(Model.Article.Title)%></h2>
    <div class="content-detail-art-date">
         <%=Model.Article.AddDate != null ? (SDT.Lib.Common.Utils.ToDayOfWeekLabel(Model.Article.AddDate) + ", " + string.Format("{0:dd/MM/yyyy, hh:mm tt}", Model.Article.AddDate)) : string.Empty%>
    </div>
    <div class="summary-detail-art">
        <%=Html.Encode(Model.Article.Summary) %>           
    </div>
    <div class="content-detail-art" id="content-art">
        <%=Model.Article.ArticleContent%>
        <% Html.RenderPartial("~/Views/Data/Attachs.ascx", Model.Article); %> 
    </div>
</div>
<div class="clear">&nbsp;</div>
<% Html.RenderAction("GetTags", "article", new { id = Model.Article.ID }); %>
<div class="clear">&nbsp;</div>
<%if (Model.Article != null)
  { %>
<% Html.RenderAction("LatestComments","Article", new { id = Model.Article.ID, number=20 }); %>
<% Html.RenderAction("Comment","Article", new { id = Model.Article.ID }); %>
<%} %>
<div class="clear"></div>
<% Html.RenderAction("OtherItems", "news", new { id = Model.Article.ID, number = 10,title="Các tin khác", greaterYN =false}); %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContent" runat="server">
   <% Html.RenderAction("Lasted", "Video", new { catid = 0, number = 3, title = string.Empty }); %>
    <div class="clear"></div>
    <% Html.RenderAction("Focus", "News", new { number = 5, skip = 0, catid = Model.Article.ArticleCategory != null ? Model.Article.ArticleCategory.ID : SDT.Model.ConfigManager.GetArticle(), title = "Tin tiêu điểm", order = "nViews", orderDir = "desc" }); %>
    <div class="clear"></div>
    <% Html.RenderAction("Lasted", "Useful", new { number = 9 }); %>
</asp:Content>
